package com.centerm.bluetooth.ibridge.listener;

import com.centerm.bluetooth.ibridge.BluetoothIBridgeDevice;

/**
 * Interface definition for callbacks to be invoked when some data has been
 * received from a remote device.
 */
public interface DataReceiver {
    /**
     * This method is called when data bytes received from a device.
     *
     * @param device the device which sends data bytes.
     * @param bytes  the data bytes received.
     * @param length the length of data bytes received.<br>
     *               <b>Note:</b> only length bytes in the array are valid.As
     *               the length of array may be larger than the parameter
     *               length, the remain bytes beyond length should not be
     *               touched.
     */
    void onDataReceived(BluetoothIBridgeDevice device, byte[] bytes, int length);
}
